/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Andre
 */
@Embeddable
public class ItensFichaPK implements Serializable {
    
    @Basic(optional = false)
    @NotNull
    @Column(name = "idFicha")
    private int idFicha;
    
    @Basic(optional = false)
    @NotNull
    @Column(name = "idExercicio")
    private int idExercicio;

    public ItensFichaPK() {
    }

    public ItensFichaPK(int idFicha, int idExercicio) {
        this.idFicha = idFicha;
        this.idExercicio = idExercicio;
    }

    public int getIdFicha() {
        return idFicha;
    }

    public void setIdFicha(int idFicha) {
        this.idFicha = idFicha;
    }

    public int getIdExercicio() {
        return idExercicio;
    }

    public void setIdExercicio(int idExercicio) {
        this.idExercicio = idExercicio;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idFicha;
        hash += (int) idExercicio;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ItensFichaPK)) {
            return false;
        }
        ItensFichaPK other = (ItensFichaPK) object;
        if (this.idFicha != other.idFicha) {
            return false;
        }
        if (this.idExercicio != other.idExercicio) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "modelo.ItensFichaPK[ idFicha=" + idFicha + ", idExercicio=" + idExercicio + " ]";
    }
    
}
